package com.aoip.telemetry.telemetry.entity.common;

import com.aoip.telemetry.telemetry.entity.equipment.StInfoConfigEntity;
import com.aoip.telemetry.telemetry.entity.equipment.StOnlineStatusEntity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 原始报文信息表实体类
 *
 * @author chenbai
 * @version 1.0
 * @date 2021/6/16 16:32
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Builder
@TableName("t_original_message")
@ApiModel(description = "原始报文信息表实体类")
public class OriginalMessageEntity implements Serializable {

    private static final long serialVersionUID = 4442447639249793150L;
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty("数据id")
    private Long id;

    @TableField(value = "st_code")
    @ApiModelProperty("测站编码")
    private String stCode;

    @TableField(exist = false)
    @ApiModelProperty("测站编码，查询")
    private String stCodeQuery;

    @TableField(value = "msg_text")
    @ApiModelProperty("原始报文")
    private String msgText;

    @TableField(exist = false)
    @ApiModelProperty("观测时间")
    private String monitoringTimeCn;

    @TableField(value = "monitoring_time")
    @ApiModelProperty("观测时间")
    private LocalDateTime monitoringTime;

    @TableField(value = "msg_body")
    @ApiModelProperty("报文正文")
    private String msgBody;

    @TableField(value = "msg_type")
    @ApiModelProperty("报文类型：1：水文，2：水资源：3地下水")
    private String msgType;

    @TableField(exist = false)
    @ApiModelProperty("报文类型对应中文，报文类型：1：水文，2：水资源：3地下水")
    private String msgTypeCn;

    @TableField(value = "msg_status")
    @ApiModelProperty("报文状态：详情见MsgCodecStatusEnum枚举类")
    private String msgStatus;

    @TableField(exist = false)
    @ApiModelProperty("报文状态对应中文，报文状态：详情见MsgCodecStatusEnum枚举类")
    private String msgStatusCn;

    @TableField(value = "function_code")
    @ApiModelProperty("报文功能码")
    private String functionCode;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField(exist = false)
    @ApiModelProperty("创建时间即为接收时间(中文)")
    private String createTimeCn;

    @TableField(exist = false)
    @ApiModelProperty("时间范围查询--开始创建时间，即为接收时间(中文)")
    private String beginQueryTimeCn;

    @TableField(exist = false)
    @ApiModelProperty("时间范围查询--结束创建时间，即为接收时间(中文)")
    private String endQueryTimeCn;

    @TableField(value = "bz")
    @ApiModelProperty("备注信息")
    private String bz;

    @TableField(exist = false)
    @ApiModelProperty("原始监测数据")
    private List<OriginalMonitoringDataEntity> monitoringDataList;

    @TableField(exist = false)
    @ApiModelProperty("测站分类")
    private String stClassification;

    @TableField(exist = false)
    @ApiModelProperty("测站类型")
    private String stType;

    @TableField(exist = false)
    @ApiModelProperty("接入测站实体")
    private StInfoConfigEntity stInfoConfigEntity;

    @TableField(exist = false)
    @ApiModelProperty("报文监测数据")
    private String monitorData;

    @TableField(exist = false)
    @ApiModelProperty("报文监测数据")
    private List<TableDataEntity> tableDataEntityList;

    @TableField(exist = false)
    @ApiModelProperty("测站在线状态")
    private StOnlineStatusEntity stOnlineStatusEntity;
}
